<?php
	class HeaderWidget extends CWidget
	{
		public function run()
		{
			$this->getheader();
		}
		public function getheader()
		{
                    
			$event_cat = EventCategory::model()->findAll(array('order' => 'priority'));
			// print_r($event_cat);die();
			if (isset(Yii::app()->session['_lang'])) {
	            $language = Yii::app()->session['_lang'];      
	        }
	        else{
	            Yii::app()->session['_lang'] = 'vi';
	            $language = Yii::app()->session['_lang'];
	        }
			$this->render('header',array('model' => $event_cat,'language' => $language));
		}
	}
?>